#!/usr/bin/node

const stdin = process.stdin,
      stdout = process.stdout;

stdin.setEncoding('utf-8');

//on是做事件处理的
stdin.on('data',(data)=>{
  stdout.write(data.toUpperCase())
})

stdin.on('end',()=>{
  process.exit(1)
})

stdin.push('hello world');
stdin.pipe(stdout);

for(let c = 'a'.charCodeAt(0); c <= 'z'.charCodeAt(0); c++){
  stdout.write(String.fromCharCode(c));
}
